package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 护理项目Mapper接口
 */
@Mapper
public interface NursingProjectMapper {
    Page<NursingProjectVo> selectByPage(NursingProjectDto dto);

    @Insert("insert into nursing_project(name,order_no,unit,price,image,nursing_requirement,status,remark,create_time,update_time)" +
            "values (#{name},#{orderNo},#{unit},#{price},#{image},#{nursingRequirement},#{status},#{remark},#{createTime},#{updateTime})")
    void insert(NursingProject nursingProject);

    @Select("select * from nursing_project where id=#{id}")
    NursingProjectVo selectById(Long id);

    void update(NursingProject nursingProject);

    void delete(Integer id);

    void disAble(Long id, Integer status);
}